window.onload = function(){
	function toDouble(num){
		if(num<10){
			return "0"+num;
		}else{
			return ""+num;
		}
	}
	function upDate(){
		var oDiv = document.getElementsByClassName('nclock')[0];
		var oSpan = oDiv.getElementsByTagName('span');
		for(i=0;i<oSpan.length;i++){
			var oDate = new Date();
			var str = toDouble(oDate.getHours())+toDouble(oDate.getMinutes())+toDouble(oDate.getSeconds());
		
			oSpan[i].innerHTML = str.charAt(i);
	 	}
 	}
 	setInterval(upDate,1000);
 	upDate();
}